package com.pro.mapper;

import com.pro.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName:JsCommentMapper
 * Package:com.pro.mapper
 * Description:
 *
 * @Date:2022/1/8 18:26
 * @Author: ZPT
 */
public interface JsGoodsCommentMapper {
    /** 
     * 
     * @author ZPT
     * @date 2022/1/8 18:26
     * @content :添加评论
     */
    Boolean addComment(JsComment comment);
    /**
     *
     * @author ZPT
     * @date 2022/1/8 18:42
     * @content :根据id查看评论
     */
    List<JsComment> getCommentById(@Param("id") Integer id, @Param("type") Integer type);
    /**
     *
     * @author ZPT
     * @date 2022/1/12 14:55
     * @content :根据userId查看后台用户信息
     */
    JsUser getUserById(Integer userId);
    /**
     *
     * @author ZPT
     * @date 2022/1/12 14:55
     * @content :根据userId查看前端用户信息
     */
    JsBeforeUser getBeforeUserById(Integer userId);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/11
     * @Content:前端用户模糊查询各种状态的评论数量
     */
    Integer GoodsCountAllComment(String status,Integer type);
    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/11
     * @Content:前端用户模糊查询各种状态的数据
     */
    List<JsComment> selectGoodsComment(String status,Integer limit,Integer page,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/11
     * @Content:前端用户历史评论人数
     */
    Integer countHistoricalCommentNum(String status,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/11
     * @Content:前端用户今日评论数量
     */
    Integer countCommentsToday(String status,Integer type,String commentDate);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/11
     * @Content:前端用户今日评论人数
     */
    Integer countCommentPeople(String status,Integer type,String commentDate);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/12
     * @Content:后端用户模糊查询各种状态的评论数量
     */
    Integer UserGoodsCountAllComment(String status,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/12
     * @Content:后端用户模糊查询各种状态的数据
     */
    List<JsComment> UserSelectGoodsComment(String status,Integer limit,Integer page,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/12
     * @Content:后端用户历史评论人数
     **/
    Integer UserCountHistoricalCommentNum(String status, Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/12
     * @Content:后端用户今日评论数量
     */
    Integer UserCountCommentsToday(String status,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/12
     * @Content:后端用户今日评论人数
     */
    Integer UserCountCommentPeople(String status,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/13
     * @Content:查看前台商品评论详情
     */
    JsProduct selectGoodsComments(Integer id, Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/13
     * @Content:删除评论（假删）
     */
    Boolean delGoodsComment(Integer id,Integer status);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/14
     * @Content:通过商品id获取其前台评论
     */
    List<JsComment> getBeforeCommentById(Integer productId,Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/14
     * @Content:添加商品评论
     */
    Boolean addGoodsComment(JsComment jsComment);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/13
     * @Content:查看后台商品评论详情
     */
    JsProduct selectGoodsUserComments(Integer id, Integer type);

    /**
     * @Description:
     * @Author: XJR
     * @Date: 2022/1/14
     * @Content:通过商品id获取其前台评论
     */
    List<JsComment> getUserCommentById(Integer productId,Integer type);

}
